package com.totem.customer.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.totem.base.mybatis.model.AbstractEntity;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotEmpty;

@EqualsAndHashCode(onlyExplicitlyIncluded=true, callSuper = true)
@Data
@Builder
@TableName("t_customers")
public class TCustomers extends AbstractEntity {
    @EqualsAndHashCode.Include
    @TableId(value="id", type= IdType.ASSIGN_ID)
    private Long id;
    @NotEmpty(message = "nickname不能为空")
    @TableField("nickname")
    private String nickname;
    @NotEmpty(message = "password不能为空")
    @TableField("password")
    private String password;
    @TableField("tx_password")
    private String txPassword;
    @TableField("email")
    private String email;
    @TableField("invite_code")
    private String inviteCode;
    @TableField("country_code")
    private String countryCode;
    @TableField("mobile")
    private String mobile;
    @TableField("source")
    private String source;
    @TableField("state")
    private int state;
    @TableField("avatar_url")
    private String avatarUrl;
}
